namespace Salesman.Genetic
{
    public abstract class Genome
    {
        private double fitness;

        public double Fitness
        {
            get { return fitness; }
            set { fitness = value; }
        }

        public abstract IGenomeFactory GenomeFactory { get; }
        public abstract Genome Clone();
        protected abstract void CreateGenes();
        public abstract void Mutate(double mutationRate);
        public abstract void CrossOverWith(Genome other, out Genome child1, out Genome child2);
    }

    public interface IGenomeFactory
    {
        Genome CreateGenome();
    }
}